package com.yytek.common.client.base;

import com.alibaba.fastjson2.JSONObject;

public class MqMessage {
	private byte[] payload;
    private int messageId;
    private int qos = 1;    //     0：最多一次的传输   1：至少一次的传输   2： 只有一次的传输
    private JSONObject jsonObject;

	public MqMessage(int messageId, byte[] payload) {
		this.messageId = messageId;
		this.payload = payload;
	}
	public String toString() {
        return new String(payload);
    }

    public JSONObject getJsonObject() {
        return jsonObject;
    }

    public void setJsonObject(JSONObject jsonObject) {
        this.jsonObject = jsonObject;
    }

    public byte[] getPayload() {
        return payload;
    }

    public void setPayload(byte[] payload) {
        this.payload = payload;
    }

    public int getMessageId() {
        return messageId;
    }

    public void setMessageId(int messageId) {
        this.messageId = messageId;
    }
	public int getQos() {
		return qos;
	}
	public void setQos(int qos) {
		this.qos = qos;
	}
}
